<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>管理</title>
		<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" href="css/bootstrap.min.css" />
		<link rel="shortcut icon" th:href="@{/img/favicon.ico}">
		<script type="text/javascript" th:src="@{/js/jquery-1.11.3.min.js}" src="js/jquery1.12.4.min.js"></script>
		<script type="text/javascript" th:src="@{/js/bootstrap.min.js}" src="js/bootstrap.min.js"></script>
		<style>
			html{
				height: 100%;
			}
			body{
				height: 100%;
			}
			.navbar{
				border-radius: 0;
				margin-bottom: 0;
			}

		</style>
		<script>

			$(function(){

				$(".js-menu").on("show.bs.collapse",function(){

					$(".js-menu").not($(this)).removeClass("in");
					$(".js-menu>li").css("background","");

				})

				$(".js-menu>li").click(function () {


					$(this).css("background","#eee");
				})

			})
		</script>
	</head>

	<body>
	<nav class="navbar navbar-inverse " >
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">王者商城</a>
			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li>
						<a href="#">XX管理系统</a>
					</li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li>
						<a href="#"><span th:text="'欢迎您：'+ ${session.adminUser.username}">小明</span></a>
					</li>
					<li>
						<a href="admin/login" th:href="@{/admin/login}">退出</a>
					</li>
				</ul>
			</div>
			<!-- /.navbar-collapse -->
		</div>
		<!-- /.container-fluid -->
	</nav>
	<div class="container-fluid" style="height: 90%;  ">
		<div class="row" style="height: 100%; ">
			<div class="col-md-2" style="height: 100%; "  >
				<ul class="nav nav-pills nav-stacked">
					<li >
						<a href="#submenu1"  data-toggle="collapse" >
							<span class="glyphicon glyphicon-expand" aria-hidden="true"></span>
							商品管理
						</a>
						<ul class="collapse nav nav-pills nav-stacked js-menu" style="margin-left: 10px;" id="submenu1">
							<li >
								<a href="#">
									<span class="glyphicon glyphicon-align-justify" aria-hidden="true"></span>
									商品列表
								</a>
							</li>
						</ul>
					</li>
					<li ><a href="#submenu2" data-toggle="collapse" >
						<span class="glyphicon glyphicon-expand" aria-hidden="true"></span>
						用户管理</a>
						<ul class="nav nav-pills nav-stacked collapse js-menu"   style="margin-left: 10px;" id="submenu2">
							<li><a th:href="@{/admin/user/list}" target="main">
								<span class="glyphicon glyphicon-align-justify" aria-hidden="true"></span>
								用户列表
							</a></li>
						</ul>

					</li>
					<li ><a href="#">订单管理</a></li>
				</ul>
			</div>
			<div class="col-md-10"style="height: 100%;" >
				<iframe name="main"style="width: 100%;" height="100%" frameborder="0" th:src="@{/admin/welcome}" src="welcome.html"></iframe>
			</div>
		</div>

	</div>
	</body>

</html>